<template>
	<view>

		<leasing-process v-if="tabbarValue === 0" />
		<index v-if="tabbarValue === 1" />

		<u-tabbar :value="tabbarValue" @change="onTabbarChange" :safeAreaInsetBottom="false">
			<u-tabbar-item text="租赁流程">
				<image class="u-page__item__slot-icon" slot="inactive-icon" src="/static/feixiang/tarbar/application.png">
				</image>
				<image class="u-page__item__slot-icon" slot="active-icon" src="/static/feixiang/tarbar/application-active.png">
				</image>
			</u-tabbar-item>
			<u-tabbar-item text="设备租赁">
				<image class="u-page__item__slot-icon" slot="inactive-icon" src="/static/feixiang/tarbar/application.png">
				</image>
				<image class="u-page__item__slot-icon" slot="active-icon" src="/static/feixiang/tarbar/application-active.png">
				</image>
			</u-tabbar-item>
		</u-tabbar>
	</view>
</template>

<script>
	import index from './index/index.vue'
	import leasingProcess from './leasing-process/leasing-process.vue'
	import equipmentDisplay from './equipment-display/equipment-display.vue'
	// import mine from './mine/mine.vue'
	export default {
		components: {
			index,
			leasingProcess,
			equipmentDisplay,
			// mine
		},
		data() {
			return {
				tabbarValue: 0,
				titles: ['租赁流程', '设备租赁']
			}
		},
		onLoad() {
			this.onTabbarChange(0)
		},
		methods: {
			onTabbarChange(e) {
				this.tabbarValue = e
				uni.setNavigationBarTitle({
					title: this.titles[e]
				})
			}
		}
	}
</script>

<style lang="scss" scoped></style>